fix(durabletask): don't let resolved event-wait timers block implicit completion#1769
Open
javier-aliaga wants to merge 1 commit into
Open
Conversation
… completion When an orchestrator returns without calling ctx.complete(), the executor auto-completes only if no pending actions remain. Since dapr#1733 every waitForExternalEvent emits a CreateTimer action, so when the final event arrives in the same work item as the completion that resumed the orchestrator, the re-armed wait's timer is still pending when the function returns — blocking the implicit completion. The workflow stayed RUNNING until that timer fired: forever, for indefinite waits. Treat pending timers of already-resolved event waits as obsolete in the implicit-completion check. All other pending actions block completion as before. The regression test reconstructs the failing production history field-for-field. Signed-off-by: Javier Aliaga <javier@diagrid.io>
377b7d7 to
16499a7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1769 +/- ##
============================================
+ Coverage 76.83% 76.86% +0.02%
- Complexity 2297 2298 +1
============================================
Files 243 243
Lines 7141 7141
Branches 745 745
============================================
+ Hits 5487 5489 +2
+ Misses 1288 1287 -1
+ Partials 366 365 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When an orchestrator returns without calling ctx.complete(), the executor auto-completes only if no pending actions remain. Since #1733 every waitForExternalEvent emits a CreateTimer action, so when the final event arrives in the same work item as the completion that resumed the orchestrator, the re-armed wait's timer is still pending when the function returns — blocking the implicit completion. The workflow stayed RUNNING until that timer fired: forever, for indefinite waits.
Treat pending timers of already-resolved event waits as moot in the implicit-completion check. All other pending actions block completion as before.
The regression test reconstructs the failing production history field-for-field.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: